package com.chenyaowei.member.service.impl;

import java.util.List;
import com.chenyaowei.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.chenyaowei.member.mapper.CywIntegrationChangeHistoryMapper;
import com.chenyaowei.member.domain.CywIntegrationChangeHistory;
import com.chenyaowei.member.service.ICywIntegrationChangeHistoryService;

/**
 * 积分变化历史记录Service业务层处理
 * 
 * @author 陈耀威
 * @date 2023-11-28
 */
@Service
public class CywIntegrationChangeHistoryServiceImpl implements ICywIntegrationChangeHistoryService 
{
    @Autowired
    private CywIntegrationChangeHistoryMapper cywIntegrationChangeHistoryMapper;

    /**
     * 查询积分变化历史记录
     * 
     * @param id 积分变化历史记录主键
     * @return 积分变化历史记录
     */
    @Override
    public CywIntegrationChangeHistory selectCywIntegrationChangeHistoryById(Long id)
    {
        return cywIntegrationChangeHistoryMapper.selectCywIntegrationChangeHistoryById(id);
    }

    /**
     * 查询积分变化历史记录列表
     * 
     * @param cywIntegrationChangeHistory 积分变化历史记录
     * @return 积分变化历史记录
     */
    @Override
    public List<CywIntegrationChangeHistory> selectCywIntegrationChangeHistoryList(CywIntegrationChangeHistory cywIntegrationChangeHistory)
    {
        return cywIntegrationChangeHistoryMapper.selectCywIntegrationChangeHistoryList(cywIntegrationChangeHistory);
    }

    /**
     * 新增积分变化历史记录
     * 
     * @param cywIntegrationChangeHistory 积分变化历史记录
     * @return 结果
     */
    @Override
    public int insertCywIntegrationChangeHistory(CywIntegrationChangeHistory cywIntegrationChangeHistory)
    {
        cywIntegrationChangeHistory.setCreateTime(DateUtils.getNowDate());
        return cywIntegrationChangeHistoryMapper.insertCywIntegrationChangeHistory(cywIntegrationChangeHistory);
    }

    /**
     * 修改积分变化历史记录
     * 
     * @param cywIntegrationChangeHistory 积分变化历史记录
     * @return 结果
     */
    @Override
    public int updateCywIntegrationChangeHistory(CywIntegrationChangeHistory cywIntegrationChangeHistory)
    {
        return cywIntegrationChangeHistoryMapper.updateCywIntegrationChangeHistory(cywIntegrationChangeHistory);
    }

    /**
     * 批量删除积分变化历史记录
     * 
     * @param ids 需要删除的积分变化历史记录主键
     * @return 结果
     */
    @Override
    public int deleteCywIntegrationChangeHistoryByIds(Long[] ids)
    {
        return cywIntegrationChangeHistoryMapper.deleteCywIntegrationChangeHistoryByIds(ids);
    }

    /**
     * 删除积分变化历史记录信息
     * 
     * @param id 积分变化历史记录主键
     * @return 结果
     */
    @Override
    public int deleteCywIntegrationChangeHistoryById(Long id)
    {
        return cywIntegrationChangeHistoryMapper.deleteCywIntegrationChangeHistoryById(id);
    }
}
